package mest.service.cxj.impl;

import mest.VO.cxj.OtherIncomeVO;
import mest.dao.cxj.OtherIncomeDao;
import mest.entity.otherincome;
import mest.service.cxj.OtherIncomeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class OtherIncomeServiceImpl implements OtherIncomeService {

    @Resource
    private OtherIncomeDao otherIncomeDao;


    @Override
    public int insertOtherIncome(otherincome oi, String theirDb) {
        return otherIncomeDao.insertOtherIncome(oi, theirDb);
    }

    @Override
    public int modifyOtherIncome(otherincome oi, String theirDb) {
        return otherIncomeDao.modifyOtherIncome(oi, theirDb);
    }

    @Override
    public List<OtherIncomeVO> selectAllOtherIncome(Integer page, Integer limit, String content, String theirDb) {
        return otherIncomeDao.selectAllOtherIncome((page - 1) * limit, limit, content, theirDb);
    }

    @Override
    public Integer selectCountOtherIncome(String content, String theirDb) {
        return otherIncomeDao.selectCountOtherIncome(content, theirDb);
    }

    @Override
    public int deleteOtherIncome(Integer id, String theirDb) {
        return otherIncomeDao.deleteOtherIncome(id, theirDb);
    }

}
